# SPDX-FileCopyrightText: 2025 MounRiver Studio <https://mounriverstudio.com/>
# SPDX-License-Identifier: BSD-3-Clause
# Author: Azolla <https://gitee.com/azolla/>
# Date: 2025-04-21

# Enable CMake support for ASM and C languages
project("utils" VERSION 1.0.0 LANGUAGES C ASM)

message(STATUS "Building utils...")

# 创建一个(接口库 INTERFACE)/(静态库 STATIC)/(动态库 SHARED)
add_library(utils STATIC)

# 获取 utils 目录下的所有 .c 文件
file(GLOB_RECURSE SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.c")

# 将这些 .c 文件添加到 utils 库中
target_sources(utils INTERFACE ${SOURCES})

# 添加头文件包含目录，这里假设头文件在当前目录下
target_include_directories(utils PUBLIC 
    ${CMAKE_CURRENT_SOURCE_DIR}
)

# 添加链接库
target_link_libraries(utils PRIVATE driver hal)
